]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: Make Return key dismiss screenshield
authorRay Strode <rstrode@redhat.com>
Wed, 12 Sep 2012 19:52:59 +0000 (15:52 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 14 Sep 2012 20:28:13 +0000 (16:28 -0400)
A couple of people have walked up to me and asked how to get to the
unlock screen from the screen shield. This was partly addressed by
bug 682285, but all three people who asked me about this said they
tried the return key and were surprised when it didn't work.

It sort of makes sense, since the user is "enter"ing the computer or
"return"ing to it.

This commit makes enter work in addition to the existing escape key.

https://bugzilla.gnome.org/show_bug.cgi?id=683889

js/ui/screenShield.js

index 8caa9cccc51214177a2f85a4cdbe6d08f49937d5..ba4afeb1c7449805a586460e19db4cfa3bb19c9e 100644 (file)
@@ -434,7 +434,11 @@ const ScreenShield = new Lang.Class({
     },
 
     _onLockScreenKeyRelease: function(actor, event) {
-        if (event.get_key_symbol() == Clutter.KEY_Escape) {
+        let symbol = event.get_key_symbol();
+
+        if (symbol == Clutter.KEY_Escape ||
+            symbol == Clutter.KEY_Return ||
+            symbol == Clutter.KEY_KP_Enter) {
             this._ensureUnlockDialog();
             this._hideLockScreen(true);
             return true;